package com.chat.api.web.vo;

import com.chat.api.utils.util.DateUtil;
import com.chat.api.web.po.RemarkBean;
import lombok.Data;

import javax.persistence.Column;
import java.io.Serializable;
import java.util.Date;

@Data
public class RemarkEntity implements Serializable {
    private static final long serialVersionUID = 1L;

    private String Id;
    private String rrId;//被回复的评论id
    private String username;//评论者名称
    private String blogId;//博客id
    private String content;//内容
    private String rDate;//评论时间

    public void setValue(RemarkBean bean){
        this.setId(String.valueOf(bean.getId()));
        this.setRrId(String.valueOf(bean.getRrId()));
        this.setUsername(bean.getUsername());
        this.setBlogId(String.valueOf(bean.getBlogId()));
        this.setContent(bean.getContent());
        this.setRDate(DateUtil.dateToStr(bean.getRDate(),8));
    }

}
